import request from '@/utils/request.js'

// 获取商品详情
export function getGoodsDetailApi(data) {
	return request.get('/?service=App.Goods.goodsDetailActionApi',data,{isLoading: true})
}
// 获取商品优惠
export function getGoodsDiscountApi(data) {
	return request.get('/?service=App.Goods.GoodsDiscountApi',data,{isLoading: true})
}
// 加入购物车
export function addGoodsCartApi(data) {
	return request.post('/?service=App.Cart.GoodsAddCartApi',data,{isAuth: true,isLoading: true,isForm: true})
}
// 购物车列表
export function getCartListApi(data) {
	return request.post('/?service=App.Cart.CartListApi',data,{isAuth: true,isForm: true})
}
// 购物车删除
export function delCartApi(data) {
	return request.post('/?service=App.Cart.CartDelApi',data,{isAuth: true,isLoading: true,isForm: true})
}
// 购物车勾选
export function selectCartApi(data) {
	return request.post('/?service=App.Cart.cartCheckApi',data,{isAuth: true,isLoading: true,isForm: true})
}
// 更新购物车数量
export function updateCartApi(data) {
	return request.post('/?service=App.Cart.CartUpdateNumApi',data,{isAuth: true,isForm: true})
}
// 商品收藏
export function collectApi(data) {
	return request.post('/?service=App.User.GoodsAddCollectApi',data,{isAuth: true,isForm: true})
}
// 更新到立即购买
export function updateGoodsApi(data) {
	return request.post('/?service=App.Cart.goodsAddCartFastApi',data,{isAuth: true,isForm: true})
}
// 热门搜索
export function getHotSearchListApi() {
	return request.post('/?service=App.Search.searchIndexActionApi',{isLoading: true})
}
// 搜索商品
export function getSearchListApi(data) {
	return request.post('/?service=App.Search.SearchHelperApi',data)
}
// 获取拼团列表
export function getGoodsGroupListApi(data) {
	return request.post('/?service=App.Goods.PintuanGoodsListApi',data,{isLoading: true})
}